Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unparse url function #2

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Unparse url function #2

wants to merge 27 commits into from

Conversation

MarikaBBB
Copy link
Owner

@MarikaBBB MarikaBBB commented Jan 21, 2025

Description:

This PR is in relation to Issue dxw#19 and implements unparse_url() function to complement PHP's native parse_url(). While parse_url() parses a URL into its components, PHP does not provide a built-in way to reconstruct the URL, which is why this function is needed.

I created PHPUnit Test class Urls_test and implemented the unparse_urls function in the Urls class.

Reference:

I looked not PHP parse_url Documentation: PhP: parse_url - Manual
Stackoverflow example solution already suggested in the #issue19 https://stackoverflow.com/questions/4354904/php-parse-url-reverse-parsed-url/31691249#31691249

How to test

Before testing please check and update dependencies by running command line composer install
Then, run the command ./vendor/bin/phpunit tests/urls_test.php for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant